package com.hui.xiao.xiaohui.fragment;

import android.app.Activity;
import android.os.Bundle;

import com.hui.xiao.xiaohui.R;

/**
 * Created by Administrator on 2016/5/27.
 */
public class BookFragmentActivity extends Activity implements BookListFragment.Callbacks {
    @Override
    public void onItemSelected(Integer id) {
        Bundle arguments = new Bundle();
        arguments.putInt(BookDetailFragment.BOOK_ID, id);
        BookDetailFragment fragment = new BookDetailFragment();
        fragment.setArguments(arguments);
        getFragmentManager().beginTransaction()
                .replace(R.id.book_detail_container, fragment)
                .commit();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.book_list_detail);
    }
}
